diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-24 15:18:36 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-24 15:18:36 +0900 |
| commit | 3e85fbde628bb556e5f6a93cafd9ba4d53031461 (patch) | |
| tree | 165726e29fe8a11a437dea06217ec4b202219e23 /app/[lng] | |
| parent | 912e2bc761d7d57bd33d68cb5050da43dea59636 (diff) | |
(김준회) fix: SWP 초기 개발건 오류 수정
Diffstat (limited to 'app/[lng]')
| -rw-r--r-- | app/[lng]/partners/(partners)/swp-document-upload/page.tsx | 20 | ||||
| -rw-r--r-- | app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx | 22 |
2 files changed, 19 insertions, 23 deletions
diff --git a/app/[lng]/partners/(partners)/swp-document-upload/page.tsx b/app/[lng]/partners/(partners)/swp-document-upload/page.tsx index 25eb52aa..5b8a0be8 100644 --- a/app/[lng]/partners/(partners)/swp-document-upload/page.tsx +++ b/app/[lng]/partners/(partners)/swp-document-upload/page.tsx @@ -2,6 +2,7 @@ import { Suspense } from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import VendorDocumentPage from "./vendor-document-page"; +import { Shell } from "@/components/shell"; export const metadata = { title: "문서 조회 및 업로드", @@ -37,21 +38,20 @@ export default async function DocumentUploadPage({ const params = await searchParams; return ( - <div className="container mx-auto py-6 space-y-6"> + <Shell> {/* 헤더 */} - <Card> - <CardHeader> - <CardTitle className="text-2xl">문서 조회 및 업로드</CardTitle> - <CardDescription> - 프로젝트별 할당된 문서를 조회하고 파일을 업로드할 수 있습니다. - </CardDescription> - </CardHeader> - </Card> + <div className="flex items-center justify-between"> + <div> + <h2 className="text-2xl font-bold tracking-tight"> + SWP 문서 제출 + </h2> + </div> + </div> {/* 메인 컨텐츠 */} <Suspense fallback={<VendorDocumentSkeleton />}> <VendorDocumentPage searchParams={params} /> </Suspense> - </div> + </Shell> ); }
\ No newline at end of file diff --git a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx index f2469c29..2431259d 100644 --- a/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx +++ b/app/[lng]/partners/(partners)/swp-document-upload/vendor-document-page.tsx @@ -12,9 +12,8 @@ import { fetchVendorDocuments, fetchVendorProjects, fetchVendorSwpStats, - type SwpTableFilters, - type SwpDocumentWithStats, } from "@/lib/swp/vendor-actions"; +import { type SwpTableFilters, type SwpDocumentWithStats } from "@/lib/swp/actions"; interface VendorDocumentPageProps { searchParams: { [key: string]: string | string[] | undefined }; @@ -91,9 +90,8 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP } catch (err) { console.error("초기 데이터 로드 실패:", err); setError(err instanceof Error ? err.message : "데이터 로드 실패"); - } finally { - setIsLoading(false); } + setIsLoading(false); // finally 대신 여기서 호출 }; const loadDocuments = async () => { @@ -152,16 +150,16 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP ); } - if (error) { - return ( - <Alert variant="destructive"> - <AlertDescription>{error}</AlertDescription> - </Alert> - ); - } return ( <div className="space-y-6"> + {/* 에러 메시지 */} + {error && ( + <Alert variant="destructive"> + <AlertDescription>{error}</AlertDescription> + </Alert> + )} + {/* 통계 카드 */} <div className="grid grid-cols-1 md:grid-cols-4 gap-4"> <Card> @@ -209,7 +207,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP filters={filters} onFiltersChange={handleFiltersChange} projects={projects} - mode="vendor" /> </CardHeader> <CardContent> @@ -220,7 +217,6 @@ export default function VendorDocumentPage({ searchParams }: VendorDocumentPageP pageSize={pageSize} totalPages={totalPages} onPageChange={handlePageChange} - mode="vendor" /> </CardContent> </Card> |
